(function ($) {
	'use strict';
	
	var SwapGroup = Backbone.View.extend({
		tagName: "div",
		id:"SwapGroup",
		className: "SwapGroup",
		models: [],
		initialize: function () {
			// console.log("$$$$$ Node_3_1 initialize");
			this.views = [];
		},
		addOneDayModel:function(dayInfo,dayDes){
			// console.log("@@@@@ Node_3_1 addModel");
			var dayViewId = "Day_"+dayDes.id;
			
			var dayView=new $_V.Node_Day({id:dayViewId,dayInfo:dayInfo,dayDes:dayDes});
				dayView.distribute();
			
			this.views.push(dayView);
			return this;
			
		},
		render: function() {
			var views = this.views;
			this.$el.html("");
			for (var v in views){
				this.$el.append(views[v].render().el);
			}
			this.reWidthSize();
			return this;
		},
		reWidthSize:function(){
				
				// var views = this.views;
				// this.$el.html("");
				// for (var v in views){
					// views[v].reWidthSize();
				// }
			
				var widths = 0;
				var nodes = this.$el.find(".Day").each(function(i) {
							widths += $(this).width();
						});
						
				this.$el.css({
					width: widths
				});
		}
	});
	$_V.SwapGroup = SwapGroup;
})(jQuery);	